Technique to share information among different cache coherency domains

ABSTRACT

A technique to enable information sharing among agents within different cache coherency domains. In one embodiment, a graphics device may use one or more caches used by one or more processing cores to store or read information, which may be accessed by one or more processing cores in a manner that does not affect programming and coherency rules pertaining to the graphics device.

RELATED APPLICATIONS

This is a Divisional Application of application Ser. No. 13/447,279,filed Apr. 15, 2012, currently pending, which is a continuation ofapplication Ser. No. 12/057,601, filed Mar. 28, 2008, currently pending.

FIELD OF THE DISCLOSURE

Embodiments of the invention relate generally to the field ofinformation processing. More particularly, embodiments of the inventionrelate to techniques to enable cache coherency among agents operating inat least two different cache coherency domains.

BACKGROUND OF THE DISCLOSURE

As more functionality is integrated into computing platforms andmicroprocessors, information sharing among different functional unitstends to increase. For example, the integration of graphics or otherthroughput logic into the same computing platform, package, orintegrated circuit as one or more host central processing units (CPUs),or “cores”, may make it desirable to share information between the oneor more cores and the graphics logic. In some prior art instances, wheredifferent functional units are integrated in the same system, package,or die, the information accessed (stored or read) by one or more coresis maintained in a corresponding cache hierarchy (e.g., level-1,mid-level, level-2 caches) that is in a different coherency domain thanthat of other functional units, such as graphics logic.

Maintaining data in different coherency domains among different cacheaddresses or according to different cache coherency domains, may requiremore cache memory to be used, which may increase system cost and powerconsumption. Moreover, in situations in which information is sharedamong the different functional units, maintaining differentcorresponding cache hierarchy domains can cause each functional unit tohave to access a main memory source, such as DRAM, to share informationamong the different functional units. Main memory sources, such as DRAM,are typically slower in terms of access speed than other memorystructures, such as cache. Therefore, resorting to main memory to shareinformation among different functional units can degrade performance ofthe functional units and/or system.

BRIEF DESCRIPTION OF THE DRAWINGS

Embodiments of the invention are illustrated by way of example, and notby way of limitation, in the figures of the accompanying drawings and inwhich like reference numerals refer to similar elements and in which:

FIG. 1 illustrates a block diagram of a system, in which at least oneembodiment of the invention may be used;

FIG. 2 illustrates a processor in which at least one embodiment of theinvention may be used.

FIG. 3 illustrates a block diagram of a shared bus computer system, inwhich at least one embodiment of the invention may be used;

FIG. 4 illustrates a block diagram a point-to-point interconnectcomputer system, in which at least one embodiment of the invention maybe used;

FIG. 5 is a flow diagram illustrating operations that may be used in oneembodiment.

DETAILED DESCRIPTION

Embodiments of the invention relate to computer systems and informationprocessing. More particularly, embodiments of the invention relate totechniques to allow at least one central processing unit (CPU) to gainvisibility into, and therefore some level of coherence with, informationbeing accessed or generated by another processing logic (e.g., graphicsprocessing logic), which may operate in a different coherency domainthan the at least one CPU. In some embodiments, one or more CPUs share alevel of cache, such as a “last level cache” (LLC) or “level-2” (L2)cache, with one or more processing logic (e.g., graphics logic), whichmay implement a different coherency protocol or otherwise operate in adifferent coherency domain from the one or more CPUs. In one embodiment,a CPU and graphics logic are integrated within the same die, package, orsystem, and the CPU may have access to at least one level of cache inthe graphics logic's cache coherency hierarchy as well as an LLC, whichthe graphics logic may also access, thereby allowing information to beshared between the CPU and the graphics logic without accessing a mainmemory source, such as DRAM.

FIG. 1 illustrates a system in which at least one embodiment may beused. In FIG. 1, at least one CPU 101 and at least one graphics logic105 are integrated within the same die, package, or system. Moreover, inone embodiment, the CPU and the graphics logic communicate with arespective cache hierarchy, which may include a first level cache, or“level-1” (L1) cache 103, 104, a mid-level cache 107, 108, and alast-level (LLC), or “level-2” (L2), cache 110. In one embodiment, eachL1 and mid-level caches are different logical structures, whereas theLLC is one cache structured that may store the same information, and istherefore inclusive of information, stored in each of the CPU's L1 andMLC, as well as the graphics logic's MLC. In one embodiment, the LLC canbe inclusive of the graphic logic's L1 cache by the graphics logicmoving or copying the contents of its L1 cache 104 to its MLC 108, whichmaintains coherency with the LLC vis-a-vis the CPU coherency controloperations. By copying or moving information the graphics L1 cache 104(which is in the graphics coherency domain 111) and the graphics MLC(which is in the CPU coherency domain 109), information may be sharebetween the CPU coherency domain 109 (which includes the CPU 101, L1cache 103, MLC 107, and LLC 110, in one embodiment) and the graphicscoherency domain 111 (which includes graphics logic 105 and graphics L1cache 104, in one embodiment).

In some embodiments, information stored in the graphics L1 cache 104,which may be addressed virtually by the graphics logic, is moved orcopied to the graphics MLC 108 in response to the occurrence of variousevents associated with rendering a graphics image. In one embodiment,the moving/copying of information from the graphics L1 cache 104 to theMLC 108 is managed and performed by a graphics driver or some otherlogic or software program. After an event that causes the information inthe graphics L1 cache 104 to be moved or copied to the MLC 108, theinformation is then within the CPU coherency domain and may be addressedand accessed by the CPU using physical addresses, in one embodiment, orother addressing schemes used by the CPU (e.g., virtual addresses).

In addition to the CPU and graphics coherency domains, the system ofFIG. 1 also includes a display device (e.g., monitor) 115 that may be inits own coherency domain 113, which is non-coherent with respect to theCPU and graphics coherency domains. In one embodiment, display device115 may communicate with a main system memory 120, instead of directlywith the caches within the cache hierarchies of the CPU or graphicslogic.

In one embodiment, the graphics logic 105 may have access to informationavailable or modifiable by the CPU without resorting to system memory120, by accessing information stored by the CPU within the LLC 110 andsnooping information in CPU's L1 (103) and CPU's MLC (107). Moreover, inone embodiment, the CPU may access, or “snoop”, information stored inthe graphics logic's mid-level cache 108 without resorting to the LLC110 or system memory 120. In one embodiment, information may be sharedbetween the CPU coherency domain and the graphics logic coherency domainwithout the CPU or graphics device having to access main system memory,which take a significant amount of time relative to accessing the cachehierarchy. Moreover, in one embodiment, information may be sharedbetween the CPU and graphics logic coherency domains withoutsignificantly altering or impacting the respective CPU or graphics cachecoherency protocols.

In one embodiment, the graphics logic generates virtual addresses toaccess data within its cache coherency domain (111). However, some ofthe caches within the graphics coherency domain, such as those that areonly read or otherwise “owned” by the graphics logic (“R/O caches”), mayuse only virtual tags, whereas other caches within the graphicscoherency domain, such as those that are both read and written by thegraphics logic (“R/W caches”), may use both virtual and physical tags inorder to support both virtual and physical addressing. In oneembodiment, graphics logic accesses to the cache hierarchy will betranslated from virtual to physical addresses if there is a cache miss,so that the proper physical address in system memory can be generated.

In the CPU coherency domain, at least two rules may apply. First, cachecoherency rules may require that access ordering on a per location basisare sequentially consistent with each other. Sequentially consistentaccesses requires global, in-order, visibility for all operationsaccessing a cache location. Secondly, CPU ordering rules typicallyrequire writes by a single processor be observed to be the same by allprocessors, but writes from different processor may be observed indifferent orders. However, a processor must observe its own writes inthe order of execution.

Graphics cache coherency domains can differ from those of a host CPU ina number of ways. For one, in graphics cache domains, coherency may onlybe guaranteed at certain points in the image rendering process, whereascoherency in typical CPU cache domains is continuously maintained. Inaddition, because graphics coherency domain caches are typicallyvirtually addressed and not snooped, inclusion of information stored inthe L1 or mid-level caches (MLC) within the LLC is not guaranteed.Therefore, when a line is evicted from the LLC the lower level cachesmay not be updated. To compensate, graphics logic may use aninvalid-to-modified (“ItoM”) transaction to perform these evictionwrite-back transactions for full line evictions and read-for-ownership(RFO) transactions for partial line evictions. Lastly, graphics devicesare typically non-speculative, out-of-order machines connected to an outof order un-core fabric. Because graphics logic cannot typically reorderaccesses after issuing them to the cache hierarchy or memory, dependentaccesses must ensure that their predecessor has been globally observedbefore they are issued.

Embodiments of the invention take into account differences between thegraphics and CPU cache coherency domains while allowing data to beshared between the domains without resorting to accessing main systemmemory. In one embodiment, CPU cache coherency rules apply to anyphysically addressed structure, including the graphics logic's mid-levelcache, LLC, and main memory. For cross-coherency boundary accessesbetween the CPU and graphics domains, the CPU may snoop the graphicsMLC, which will behave the same as in the CPU coherency domain.Moreover, embodiments of the invention allow for the inclusion of datastored in the graphics L1 and MLC within the LLC, so that the graphicslogic may make use of the LLC without resorting the main system memory.In one embodiment, data from the graphics L1 is included in the LLC bythe graphics device copying or moving L1 data to its MLC in response toa rendering event, thereby putting the graphics L1 data within the CPUcoherency domain and ensuring its inclusion the LLC. The graphics logiccan then access this information later from the LLC if it's not foundwithin the graphics L1 or MLC.

FIG. 2 illustrates a processor in which at least one embodiment of theinvention may be used. In particular, FIG. 2 illustrates processor 200having one or more central processing units (CPUs) 205 and 210 and atleast one non-CPU functional unit 207 and 213, respectively. Alsoillustrated in FIG. 2 is at least one other non-CPU functional unit 215which may perform other operations not performed by functional units 207and 213. In one embodiment, the functional units 207, 213, and 215 mayinclude functions such as graphics processing, memory control andperipheral control, such as audio, video, disk control, digital signalprocessing, etc. In some embodiments, processor 200 may also includeother logic not shown in FIG. 2, such as I/O control. In one embodiment,each processor in a multi-processor system or each processor core in amulti-core processor may include or otherwise be associated with logic219 to enable information sharing between one or more CPUs and one ormore graphics logic.

In some embodiments, the processor 200 may be a general purpose CPU. Inother embodiments, the processor may be either a general purpose CPU orhardware that can perform graphics-specific functions within a systemthat may include both general purpose CPU integrated circuits as well asgraphics-specific hardware or other parallel computational hardware. Asgeneral purpose computing becomes more integrated with parallelcomputational hardware, such as graphics engines, texture samples, etc.,the more versatile and location-independent the logic 219 becomes. As aresult, logic 219 could include hardware/software or any combinationthereof and be located or integrated within or outside of any portion ofthe processor 200.

In one embodiment, logic 219 includes logic for enabling a CPU to snoopa graphics MLC without significantly modifying the cache coherency rulesof either the CPU or the graphics logic. Moreover, logic 219 may includelogic to allow the graphics device to access information within an LLCwithout first resorting to main memory. In addition, logic 219 may helpto inform the CPU when information stored in the graphics L1 cache isnow present in the graphics MLC, so that the CPU may snoop it.

FIG. 3 illustrates a shared-bus computer system in which one embodimentof the invention may be used. Microprocessors 301-315 may containvarious functional units, such as one or more CPUs (323, 327, 333, 337,343, 347, 353, 357), graphics device (307, 317, 327, 337), memorycontroller (325, 335, 345, 355), I/O control, or other functional units,such as a PCI or PCIe controller (320, 330, 340, 350). The system ofFIG. 3 may also include an I/O controller 365 to interface themicroprocessors to peripheral control devices 360.

In one embodiment, the system includes logic 319 for enabling a CPU tosnoop a graphics MLC without significantly modifying the cache coherencyrules of either the CPU or the graphics logic. Moreover, logic 319 mayinclude logic to allow the graphics device to access information withinan LLC without first resorting to main memory. In addition, logic 219may help to inform the CPU when information stored in the graphics L1cache is now present in the graphics MLC, so that the CPU may snoop it.

In some embodiments, some or all of the elements illustrated in FIG. 3may be included in a microprocessor and include other interconnects,such as direct memory interface (DMI), a PCI express graphics (PEG)interconnect, etc. Regardless of configuration, embodiments of theinvention may be included or otherwise associated with any portion ofthe system of FIG. 3. The system of FIG. 3 may also include main memory(not shown), which may be include various memory structures, such asdynamic random-access memory (DRAM), a hard disk drive (HDD), or amemory source located remotely from the computer system via networkinterface containing various storage devices and technologies. Cachememory within the system of FIG. 3 may be located either within aprocessor or in close proximity to a processor, such as on theprocessor's local bus.

Furthermore, the cache memory may contain relatively fast memory cells,such as a six-transistor (6T) cell, or other memory cell ofapproximately equal or faster access speed.

In addition to the shared-bus computer system illustrated in FIG. 3,other system configurations may be used in conjunction with variousembodiments of the invention, including point-to-point (P2P)interconnect systems and ring interconnect systems. The P2P system ofFIG. 4, for example, may include several processors, of which only two,processors 470, 480 are shown by example. Processors 470, 480 may eachinclude a local memory controller hub (MCH) 472, 482 to connect withmemory 42, 44. Processors 470, 480 may exchange data via apoint-to-point (P2P) interface 450 using P2P interface circuits 478,488. Processors 470, 480 may each exchange data with a chipset 490 viaindividual P2P interfaces 452, 454 using point to point interfacecircuits 476, 494, 486, 498. Chipset 490 may also exchange data with ahigh-performance graphics circuit 438 via a high-performance graphicsinterface 439. Embodiments of the invention may be located within anyprocessor having any number of processing cores, or within each of theP2P bus agents of FIG. 4.

In one embodiment, FIG. 4 includes logic 419 for enabling a CPU to snoopa graphics MLC without significantly modifying the cache coherency rulesof either the CPU or the graphics logic. Moreover, logic 419 may includelogic to allow the graphics device to access information within an LLCwithout first resorting to main memory. In addition, logic 219 may helpto inform the CPU when information stored in the graphics L1 cache isnow present in the graphics MLC, so that the CPU may snoop it.

FIG. 5 illustrates a flow diagram of operations that may be used inconjunction with at least one embodiment of the invention. At operation501, a graphics device causes information stored in its L1 cache to becopied or moved to a MLC within a CPU coherency domain and a snoop isissued from a CPU to a graphics logic's MLC for the informationrequested by the CPU at operation 505. If the requested information isnot present in the graphics logic's MLC at operation 510, the snoop mayprogress to the LLC for the information at operation 520. If theinformation is not present in the LLC at operation 520, then the accessprogresses to main memory at operation 525. In one embodiment, the CPUmay use physical addresses to snoop the MLC because the MLC contains aphysical address tag in addition to the virtual address tag used by thegraphics logic. Moreover, because in one embodiment, the graphics logicmay store and access information within the LLC, the informationrequested by the CPU may be within the LLC instead of the MLC.

One or more aspects of at least one embodiment may be implemented byrepresentative data stored on a machine-readable medium which representsvarious logic within the processor, which when read by a machine causesthe machine to fabricate logic to perform the techniques describedherein. Such representations, known as “IP cores” may be stored on atangible, machine readable medium (“tape”) and supplied to variouscustomers or manufacturing facilities to load into the fabricationmachines that actually make the logic or processor.

Thus, a method and apparatus for directing micro-architectural memoryregion accesses has been described. It is to be understood that theabove description is intended to be illustrative and not restrictive.Many other embodiments will be apparent to those of skill in the artupon reading and understanding the above description. The scope of theinvention should, therefore, be determined with reference to theappended claims, along with the full scope of equivalents to which suchclaims are entitled.

What is claimed is:
 1. A system in a processor comprising: a centralprocessing unit (CPU) within a CPU cache coherency domain having a firstset of coherency rules; a graphics device within a graphics cachecoherency domain having a second set of coherency rules different fromthe first set of coherency rules; a CPU cache hierarchy including theCPU and including: a level 1 (L1) CPU cache operatively coupled with theCPU, and a second cache at a different level than the L1 CPU cache, thesecond cache being physically addressed; and a graphics cache hierarchyincluding the graphics device and including: an L1 graphics cacheoperatively coupled with the graphics device, and a third cache at adifferent level than the L1 graphics cache, the third cache beingphysically addressed; said CPU to apply the first set of coherency rulesto the third cache, and said graphics device to apply the second set ofcoherency rules to the third cache, thereby allowing data to be sharedbetween the CPU cache coherency domain and the graphics cache coherencydomain.
 2. The system of claim 1 wherein the third cache is a mid-levelcache (MLC).
 3. The system of claim 2 wherein the second cache is alast-level cache (LLC) inclusive of information stored in each of thethird cache and the L1 CPU cache.
 4. The system of claim 1 wherein saidgraphics device is to store data from the L1 graphics cache to the thirdcache in response to a graphics rendering event.
 5. The system of claim4 wherein the L1 graphics cache is virtually addressed.
 6. The system ofclaim 4 wherein said CPU is to snoop the third cache thereby allowingdata to be shared between the CPU cache coherency domain and thegraphics cache coherency domain.
 7. The system of claim 4 wherein saidCPU is to apply the first set of coherency rules to all physicallyaddressed structures, including the second and third caches and mainmemory, thereby allowing data to be shared between the CPU cachecoherency domain and the graphics cache coherency domain.